package com.lmt_12;

public class MyThread {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("hahhahhahha");
            }
        }).start();

        MMThread thread = new MMThread();
        thread.start();
        TThread tThread = new TThread();
         new Thread(tThread).start();
    }
}

class MMThread extends Thread {
    @Override
    public void run() {
        System.out.println("extends Thread method");
    }
}
class TThread implements Runnable{

    @Override
    public void run() {
        System.out.println("implements thread ");
    }
}
